home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zoom 1
/
Zoom (1995)(Active Software, Ground Zero).iso
/
utils
/
u616.dms
/
u616.adf
/
BrowserII_v3
/
Sources
/
VolName.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-03-16
|
843b
|
42 lines
/*
* VolName.c - Copyright © 1993 by Devil's child.
*
* Created: 16 Mar 1993 22:50:03
* Modified: 16 Mar 1993 23:04:05
*
* Make>> sc <file>.c
* Make>> slink <file>.o SC SD ND BATCH NOICONS TO <file> LIB LIB:String.lib
*/
long VolName(void)
{
struct ExecBase *SysBase = *((struct ExecBase **)4L);
struct DosLibrary *DOSBase;
// APTR UtilityBase;
struct RDArgs *RA;
char *Argv[] = { NULL, NULL };
UBYTE *s;
long rc=20;
if (DOSBase = (struct DosLibrary *)OpenLibrary("dos.library", 37)) {
// UtilityBase = DOSBase->dl_UtilityBase;
if (RA = ReadArgs("Vol/A", (long *)Argv, NULL)) {
if (s = StrChr(Argv[0], ':')) {
*s = '\0';
Printf("%s\n", Argv[0]);
rc = 0;
}
else
rc = 10;
FreeArgs(RA);
}
else
PrintFault(IoErr(), "VolName");
CloseLibrary((struct Library *)DOSBase);
}
return rc;
}